<<<<<<< .mine
#include<stdio.h>
#include<stdlib.h>
   struct global_node
   {
      int value;
      struct global_node *next;
   };
   
struct global_node *first=NULL;



struct global_node *display(struct node *first)
{
    struct global_node *p;
    printf("the list is : ");
    for(p=first; p!=NULL; p=p->next)
    {
        printf("%d",p->value);
    }
    //return first;
}
=======
#include<stdio.h>
#include<stdlib.h>
   struct global_node
   {
      int value;
      struct global_node *next;
   };
   
struct global_node *first=NULL;



struct global_node *display(struct node *first)
{
    struct global_node *p;
    printf("the list is : ");
    for(p=first; p!=NULL; p=p->next)
    {
        printf("%d",p->value);
    }
    //return first;
}
   
void add_values(struct global_node *first_node, int number_to_add)
{

    struct global_node *new_node;                           //We take a new node having the same instance as that of the struct global_node and make 
                                                           //It point its value to the number to add .  
           
    new_node=malloc(sizeof(struct global_node));
    
    if(new_node==NULL)
    {
       printf("The space is not allocated");
    }
    
    
    new_node -> value = number_to_add;
    new_node -> next = first_node;  
    first_node = new_node;       
    
}

void append()

{
       int number_to_append;
       printf("Enter the element you want to append :");
       scanf("%d",&number_to_append);
       first_node = add_values(first_node,number_to_append);
       display();
       
}


struct global_node * extend(struct global_node *first_node)
{
      int n,m,i;
      printf("enter the number of elements you want to extend :");
      scanf("%d",&m);
      printf("enter the elements : ");
      for(i=0;i<m;i++)
      {
          scanf("%d",&n);
          first_node=add_values(first_node,n);
      }
      display();
      return first_node;
}
>>>>>>> .r6
